﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Music Player For Html5</title>
    <meta name="viewport" content="width=400, initial-scale=1.0,maximum-scale=1.0, user-scalable=no">

    <link rel="stylesheet" type="text/css" href="/css/style.css">
    <link rel="stylesheet" type="text/css" href="/css/demo.css">

    <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.0.js"></script>
    <script type="text/javascript" src="/js/jquery-jplayer/jquery.jplayer.js"></script>
    <script type="text/javascript" src="/js/ttw-music-player.js"></script>
</head>
<body>
    <input type="hidden" id="xiami_playlist_url" value="@(HttpUtility.UrlEncode(ViewBag.PlayListUrl ?? ""))" />
    <input type="hidden" id="xiami_playlist_des" value="@(ViewBag.Des)" />
    <script type="text/javascript">
        $(document).ready(function () {
            var playlist = $('#xiami_playlist_url').val();
            $.getJSON(
                "/home/playlist",
                {
                    url: playlist
                },
                function (playlist) {
                    var des = 'Xiami Music Html5 Player.';
                    des += $('#xiami_playlist_des').val();
                    $('body').ttwMusicPlayer(playlist, {
                        autoplay: true,
                        description: des,
                        jPlayer: {
                            swfPath: '../js/jquery-jplayer'
                        }
                    });
                });
        });
    </script>
</body>
</html>

